package com.gqzmy.springboot3.vo;

import com.gqzmy.springboot3.constant.RegexExpressionPool;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Pattern;

/**
 * @author 周小哥  gqzmy@163.com 2023/4/21 14:34
 * <p>
 * 注册用户对象
 */

public record UserRegister(
        @Pattern(regexp = RegexExpressionPool.ACCOUNT, message = "账号: " + RegexExpressionPool.ACCOUNT_MESSAGE)
        String userAccount,

        @Pattern(regexp = RegexExpressionPool.NAME_ZH, message = "昵称: " + RegexExpressionPool.NAME_ZH_MESSAGE)
        String userName,

        @Pattern(regexp = RegexExpressionPool.PASSWORD, message = "密码: " + RegexExpressionPool.PASSWORD_MESSAGE)
        String password,

        @Email(message = "邮箱: 格式不正确")
        String email) {
}
